summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorjakob2020-12-22 16:54:24 +0100
committerjakob2020-12-22 16:54:52 +0100
commit8cce2b82baf8dd414a6e967ac7b86685a8e48bea (patch)
tree8d608beb51c003b7b53590c17c8e8b551b37cda6
parent9522a6332f8b715fe6fc7436bf3431899f7bf5b0 (diff)
downloadaur-8cce2b82baf8dd414a6e967ac7b86685a8e48bea.tar.gz
0.9.0-2 Patch repeating job queue bug
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD18
-rw-r--r--fix-job-queue-repeating-put.patch9
3 files changed, 26 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index ea0e498a224d..36bf35b62209 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = python-semaphore-bot
pkgdesc = A simple (rule-based) bot library for Signal Private Messenger.
pkgver = 0.9.0
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/lwesterhof/semaphore
arch = x86_64
arch = i686
@@ -9,12 +9,14 @@ pkgbase = python-semaphore-bot
license = AGPL3
makedepends = python-setuptools
depends = python
- depends = signald>=0.11.1
+ depends = signald-git
depends = python-anyio
depends = python-attrs
depends = python-dateutil
source = https://files.pythonhosted.org/packages/source/s/semaphore-bot/semaphore-bot-0.9.0.tar.gz
+ source = fix-job-queue-repeating-put.patch
sha256sums = b23c0eb61ed2fbeb8d95a97a8cce128a87435b29fa0a7ad0e73180b4a7bf639e
+ sha256sums = 775b01445f39b43a25ff2ac0df66b479fb56131afadf1de1fb20f97449ccecf3
pkgname = python-semaphore-bot
diff --git a/PKGBUILD b/PKGBUILD
index 0ea10226d3c9..b201df398390 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,24 +3,32 @@
_pkgname=semaphore-bot
pkgname=python-${_pkgname}
pkgver=0.9.0
-pkgrel=1
+pkgrel=2
pkgdesc="A simple (rule-based) bot library for Signal Private Messenger."
arch=(x86_64 i686 aarch64)
url="https://github.com/lwesterhof/semaphore"
license=('AGPL3')
depends=(
python
- "signald>=0.11.1"
+ signald-git
python-anyio
python-attrs
python-dateutil
)
makedepends=('python-setuptools')
-source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
-sha256sums=('b23c0eb61ed2fbeb8d95a97a8cce128a87435b29fa0a7ad0e73180b4a7bf639e')
+source=(
+ "https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
+ "fix-job-queue-repeating-put.patch"
+)
+sha256sums=(
+ 'b23c0eb61ed2fbeb8d95a97a8cce128a87435b29fa0a7ad0e73180b4a7bf639e'
+ '775b01445f39b43a25ff2ac0df66b479fb56131afadf1de1fb20f97449ccecf3'
+)
prepare() {
- sed -i '/attr==0.3.1/d' "$_pkgname-$pkgver/setup.py"
+ cd "$_pkgname-$pkgver"
+ sed -i '/attr==0.3.1/d' setup.py
+ patch -p0 < ../fix-job-queue-repeating-put.patch
}
package() {
diff --git a/fix-job-queue-repeating-put.patch b/fix-job-queue-repeating-put.patch
new file mode 100644
index 000000000000..6e30383ac45a
--- /dev/null
+++ b/fix-job-queue-repeating-put.patch
@@ -0,0 +1,9 @@
+--- semaphore/job_queue.py
++++ semaphore/job_queue.py
+@@ -118,5 +118,5 @@
+
+ if job.is_repeating():
+ interval = job.get_interval()
+- await self._queue.put(now + interval, job)
++ await self._queue.put_nowait(now + interval, job)
+ self.log.info(f"Added repeating job ({id(job)}) to the queue")