sahilg1410 / google-api-php-client

Automatically exported from code.google.com/p/google-api-php-client
Apache License 2.0
0 stars 0 forks source link

Delay in Time to Sync file modifiedDate and last revision modifiedDate #244

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.go to drive ui create new file (.docx,.ppt etc), write something in file , 
save and close file
2.now click on file it will open a file in edit mode, modify file and check 
revision history, now see date_modified of last revision and date_modified of 
file on last page where all drive files are listed, you will see the difference 
between these two times. 
3.refresh page where all drive files are listed , still you will see the 
difference . sometime it will sync this date immediately but often it will be 
synced after 2 or more minutes .

Actual output: date_modified is different from last revision modified_date
Expected output: date_modified should be same as last revision modified_date

I am using:
google-api-php-client latest release,
drive api version2

My issue is i am making a request for file lists having modified_date greater 
than provided date.
As i stated above file is modified but i am not getting that file in result 
that should be in result. After 2-7 minutes when i tried to get list with same 
parameters as in previous request now file is in result.

I want to know whether the resource where revision history residing and there 
resource where files metadata residing are two different resources????

when i search for files with q param modifiedDate >= 'some valid date UTC'
is not searching according to last revision date_modified?????
I want to know max delay time for this??because this slight difference in time 
matters for me, i am going to sync files with my system and if file is not 
returned it will never be synced until and unless it is modified again.

this is my code snippet i am using

function getUpdatedFiles($service){
$files_updated=array();
try{

  $files = $service->files->listFiles($this->getAdditionalParams());
  if(is_object($files)){// useObjects is true for google client
  $items=$files->getItems();
  foreach($items as $item){
  $files_updated[]=$this->objToArray($item);
  }
  }else {
  // means useObjects is false by default and google will return arrays
  $files_updated=$files['items'];
  }
  return $files_updated;
  }
  catch (Exception $e){
  $GLOBALS['log']->fatal("Exception Occurred: ". $e->getMessage());
  return false;
  }
  }

please help me to resolve this issue
Thanks,
Jaffar

Original issue reported on code.google.com by jaffar.h...@rolustech.com on 9 Jan 2013 at 5:16

GoogleCodeExporter commented 9 years ago
sorry i forgot to mention this function
function getAdditionalParams(){
 return array("q"=>"modifiDate >= '2013-01-08T14:42:00.000Z'");
 }

Original comment by jaffar.h...@rolustech.com on 9 Jan 2013 at 5:21

GoogleCodeExporter commented 9 years ago
Hi, are you still having this issue? You might find you get a faster response 
on StackOverflow where the Drive API team monitor this tag: 
http://stackoverflow.com/questions/tagged/google-drive-sdk

Original comment by ianbar...@google.com on 22 Mar 2013 at 4:40

GoogleCodeExporter commented 9 years ago
hi,
i have got response
here is link 
http://stackoverflow.com/questions/14209263/google-drive-api-issue

Original comment by jaffar.h...@rolustech.com on 25 Mar 2013 at 4:57

GoogleCodeExporter commented 9 years ago
Excellent, thanks for updating us!

Original comment by ianbar...@google.com on 26 Mar 2013 at 11:42