Skip to content

Commit

Permalink
Unix absolute path file write
Browse files Browse the repository at this point in the history
  • Loading branch information
maiqbal11 committed Nov 8, 2018
1 parent 4c790b7 commit 0bde3f1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions azure/functions_worker/dispatcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ async def _dispatch_grpc_request(self, request):
async def _handle__worker_init_request(self, req):
logger.debug('Received WorkerInitRequest, request ID %s',
self.request_id)
with open("myfile.txt", "a") as f:
with open("/myfile.txt", "a") as f:
f.write('Received WorkerInitRequest, request ID')

return protos.StreamingMessage(
Expand All @@ -212,7 +212,7 @@ async def _handle__function_load_request(self, req):

logger.debug('Received FunctionLoadRequest, request ID: %s, '
'function ID: %s', self.request_id, function_id)
with open("myfile.txt", "a") as f:
with open("/myfile.txt", "a") as f:
f.write('Received FunctionLoadRequest')

try:
Expand All @@ -228,7 +228,7 @@ async def _handle__function_load_request(self, req):
logger.debug('Successfully processed FunctionLoadRequest, '
'request ID: %s, function ID: %s',
self.request_id, function_id)
with open("myfile.txt", "a") as f:
with open("/myfile.txt", "a") as f:
f.write('Successfully processed FunctionLoadRequest')

return protos.StreamingMessage(
Expand Down Expand Up @@ -262,7 +262,7 @@ async def _handle__invocation_request(self, req):
logger.debug('Received FunctionInvocationRequest, request ID: %s, '
'function ID: %s, invocation ID: %s',
self.request_id, function_id, invocation_id)
with open("myfile.txt", "a") as f:
with open("/myfile.txt", "a") as f:
f.write('Received FunctionInvocationRequest')

try:
Expand Down Expand Up @@ -329,7 +329,7 @@ async def _handle__invocation_request(self, req):
logger.debug('Successfully processed FunctionInvocationRequest, '
'request ID: %s, function ID: %s, invocation ID: %s',
self.request_id, function_id, invocation_id)
with open("myfile.txt", "a") as f:
with open("/myfile.txt", "a") as f:
f.write('Successfully processed FunctionInvocationRequest')

return protos.StreamingMessage(
Expand Down
2 changes: 1 addition & 1 deletion azure/functions_worker/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def main():
logger.info('Worker ID: %s, Request ID: %s, Host Address: %s:%s',
args.worker_id, args.request_id, args.host, args.port)

with open("myfile.txt", "a") as f:
with open("/myfile.txt", "a") as f:
f.write('Starting Azure Functions Python Worker')

try:
Expand Down

0 comments on commit 0bde3f1

Please sign in to comment.