Selaa lähdekoodia

print for server response

Gamaliel Espinoza 7 vuotta sitten
vanhempi
commit
d9f4c7c4b3
1 muutettua tiedostoa jossa 3 lisäystä ja 2 poistoa
  1. 3 2
      ondemand/service.py

+ 3 - 2
ondemand/service.py

@@ -136,12 +136,13 @@ def process_segment(item):
             break
     
     try:
-        client.put_schedule_results(
+        response = client.put_schedule_results(
             item['schedule'],
             item['id'],
             results,
             found=found['timestamp'] if found else None,
         )
+        print(response)
     except ConnectionError as ex:
         print(ex, file=sys.stderr)
     except UserWarning as warn:
@@ -153,7 +154,7 @@ def iterate_audios(dt, station):
     the the date and itself plus 5 minutes;
     station must match too """
     from_time = time.mktime(dt.timetuple())
-    to_time = from_time + 3600
+    to_time = from_time + 3599
 
     print('from {} to {}'.format(from_time, to_time))