google-compute-engine"/>
  • 9
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191

Backtrace:

File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

I'm building a program that processes csv files and extracts data from them using a shell script whenever a user uploads the file to a google storage bucket. Users can upload files any number of times in a day and they have to be processed immediately. How can I achieve this ?

If you have the program that will be processing the csv files on a Linux machine you can do this:

  1. Create a IAM user to get access to the bucket with the csv.
  2. Install the gsutil on your linux and configure the access with the IAM user.
  3. Create a shell script using the gsutil rsync command like, here the documentation.

    gsutil rsync -d -r bucket local_dir

  4. With this command you can synchronize a bucket with a local folder and viceversa, so only the new files will be downloaded, you can do this every minute or wherever you want.

  5. Process the new cvs files

  • 0
Reply Report

Warm tip !!!

This article is reproduced from Stack Exchange / Stack Overflow, please click

Trending Tags