extface 0.7.2 → 0.7.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8efd853272c69b139418f39bb6da6668ff26421b3306bb19362b297766b8dd1c
4
- data.tar.gz: 5e1b4d8944463cad340a6a9cf595abb9809cd83c4a7921b597046a54228bbda0
3
+ metadata.gz: e1a096752065cbf8fefb7ef4ef3e9bb54c79791cf139a14e279f94d17fb99654
4
+ data.tar.gz: 6d97c19cb4810dc78c1f203f1de13fc38761e79cc8130bbf084247252c8f6a72
5
5
  SHA512:
6
- metadata.gz: abc4767ce19343e70426c08ad4f05ea6b0bfd752864d62f3ee7ac27ec649edbc53f5925f2b92549cec95ac2843b2259473962f4136ba27f0cd8889289e99f606
7
- data.tar.gz: 87e86cb335fcd01d503e638334943bd7d27653f84ec0a96a8f7435f8d615e388282edaf9f51671c32e94319c6b0ea5435fb27c13d46a9f8c6343a2c38cb0b2a7
6
+ metadata.gz: 6c8a544ff4ca31742427b611abd18b813fee29e9d76d2ac81e5f8acbf0e5a6feb1d14d6851289542b1534461849d24fb6b2a5628c167fbb7e23c204496695aca
7
+ data.tar.gz: ab0be34e4579edb0dafbd8be4dbe2dc44610b715215fd781413f17a6a344e1d2826ed6185927f2eef6fbf466a790c6bf3c5db7bf00a2b18660e4784d939e24bd
@@ -70,14 +70,20 @@ module Extface
70
70
  # find current job or get new one
71
71
  Extface.redis_block do |r|
72
72
  start = Time.now
73
+ isRetry = false
73
74
  if job = device.jobs.active.find_by(id: cookies[:extface]) || device.jobs.active.try(:first)
74
75
  cookies.permanent[:extface] = job.id
75
76
  p "Processing job #{job.id}"
76
77
  list, data = r.blpop(job.id, timeout: 1)
77
- while data
78
- response.stream.write data
79
- r.publish(job.id, "OK")
80
- if (Time.now - start) > 1.8.seconds
78
+ while (data || !isRetry)
79
+ if data
80
+ response.stream.write data
81
+ r.publish(job.id, "OK")
82
+ isRetry = false
83
+ else #retry
84
+ isRetry = true
85
+ end
86
+ if (Time.now - start) > 2.8.seconds
81
87
  p "############ Will continue next time"
82
88
  break
83
89
  end
@@ -1,3 +1,3 @@
1
1
  module Extface
2
- VERSION = "0.7.2"
2
+ VERSION = "0.7.3"
3
3
  end
Binary file
@@ -18763,3 +18763,20 @@ Completed 200 OK in 10004ms (ActiveRecord: 3.2ms)
18763
18763
  ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
18764
18764
   (0.1ms) begin transaction
18765
18765
   (0.1ms) commit transaction
18766
+  (0.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
18767
+  (126.7ms) DROP TABLE IF EXISTS "extface_devices"
18768
+  (0.4ms) SELECT sqlite_version(*)
18769
+  (85.6ms) CREATE TABLE "extface_devices" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "uuid" varchar, "name" varchar, "extfaceable_id" integer, "extfaceable_type" varchar, "driver_id" integer, "created_at" datetime, "updated_at" datetime, "encoding" varchar)
18770
+  (80.3ms) DROP TABLE IF EXISTS "extface_drivers"
18771
+  (90.3ms) CREATE TABLE "extface_drivers" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "type" varchar, "settings" text, "created_at" datetime, "updated_at" datetime)
18772
+  (84.1ms) DROP TABLE IF EXISTS "extface_jobs"
18773
+  (86.9ms) CREATE TABLE "extface_jobs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "device_id" integer, "created_at" datetime, "updated_at" datetime, "description" varchar, "error" varchar, "failed_at" datetime, "completed_at" datetime, "connected_at" datetime, "started_at" datetime)
18774
+  (79.4ms) CREATE INDEX "index_extface_jobs_on_device_id" ON "extface_jobs" ("device_id")
18775
+  (81.0ms) DROP TABLE IF EXISTS "extface_serial_configs"
18776
+  (81.3ms) CREATE TABLE "extface_serial_configs" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "driver_id" integer, "serial_boud_rate" integer, "serial_data_length" integer, "serial_parity_check" integer, "serial_stop_bits" integer, "serial_handshake" integer, "created_at" datetime, "updated_at" datetime)
18777
+  (67.9ms) DROP TABLE IF EXISTS "shops"
18778
+  (114.7ms) CREATE TABLE "shops" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "created_at" datetime, "updated_at" datetime)
18779
+  (0.3ms) SELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC
18780
+ ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", "environment"], ["LIMIT", 1]]
18781
+  (0.1ms) begin transaction
18782
+  (0.1ms) commit transaction
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: extface
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Vangelov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-12 00:00:00.000000000 Z
11
+ date: 2019-03-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: redis