mirror of
https://fast.feibisi.com/https://github.com/parcelvoy/platform.git
synced 2025-08-29 11:56:04 +08:00
Minor bug fixes & build job (#89)
This commit is contained in:
parent
152fe8d430
commit
b8d246592d
4 changed files with 24 additions and 3 deletions
21
.github/workflows/test.yml
vendored
21
.github/workflows/test.yml
vendored
|
@ -76,3 +76,24 @@ jobs:
|
|||
BASE_URL: https://parcelvoy.com
|
||||
QUEUE_DRIVER: memory
|
||||
STORAGE_DRIVER: s3
|
||||
|
||||
build:
|
||||
needs: lint
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [18.x]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Node Install
|
||||
run: |
|
||||
npm install
|
||||
- name: Build
|
||||
run: |
|
||||
npm run build
|
||||
|
|
|
@ -17,7 +17,7 @@ export default class CampaignSendJob extends Job {
|
|||
|
||||
await campaignSendReadyQuery(campaign.id)
|
||||
.stream(async function(stream) {
|
||||
for await (const { user_id, ...campaign } of stream) {
|
||||
for await (const { user_id } of stream) {
|
||||
await sendCampaign(campaign, user_id)
|
||||
}
|
||||
})
|
||||
|
|
|
@ -99,7 +99,8 @@ class SchedulerLock {
|
|||
// Clean up any oddball pending jobs that are missed
|
||||
// Randomly run this job to reduce chance of deadlocks
|
||||
if (randomInt() < 10) {
|
||||
await JobLock.delete(qb => qb.where('expiration', '<=', new Date()))
|
||||
await sleep(randomInt(5, 20))
|
||||
await JobLock.delete(qb => qb.where('expiration', '<=', new Date()).orderBy('id'))
|
||||
}
|
||||
|
||||
return acquired
|
||||
|
|
|
@ -76,7 +76,6 @@ export function EntityIdPicker<T extends { id: number }>({
|
|||
<span className={clsx('ui-text-field', size ?? 'regular')} style={{ flexGrow: 1 }}>
|
||||
<Combobox.Input
|
||||
displayValue={(value: T) => value && displayValue(value)}
|
||||
disabled={Boolean(value && !entity)}
|
||||
onChange={e => setQuery(e.target.value)}
|
||||
onBlur={onBlur}
|
||||
ref={(input: HTMLInputElement) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue