Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀
to the moon

Adam Urban urbanisierung

🚀
to the moon
View GitHub Profile
View bucket.worker.ts
export class BucketWorker {
constructor(private zeebeController: ZeebeController) {}
public create() {
this.zeebeController.getZeebeClient().createWorker({
taskType: Worker.AWS_BUCKET_UPLOAD,
taskHandler: async (job: any, complete: any, worker: any) => {
const jobId = job.variables.jobId;
if (!jobId) {
complete.failure('Job Id not found on process context: <jobId>');
View websiteshot.worker.ts
export class WebsiteshotWorker {
constructor(private zeebeController: ZeebeController) {}
public create() {
this.zeebeController.getZeebeClient().createWorker({
taskType: Worker.WEBSITESHOT_CREATE_JOB,
taskHandler: async (job: any, complete: any, worker: any) => {
const templateId = job.customHeaders.templateid;
if (!templateId) {
View slack.worker.ts
import { IncomingWebhook } from '@slack/webhook'
import { ZeebeController } from '../zeebe.controller'
const SLACK_WEBHOOK_BASE = 'https://hooks.slack.com/services'
export class SlackWorkerController {
private webhook: IncomingWebhook | null = null
constructor(private zeebeController: ZeebeController) {}
View MoodRouter.ts
const express = require('express')
import { NextFunction, Request, Response } from 'express'
import { MoodController } from '../../controller/mood.controller'
import { StorageController } from '../../controller/storage.controller'
import { Error, ErrorType } from '../../utils/Error'
export class MoodRouter {
public router = express.Router({ mergeParams: true })
constructor(store: StorageController) {
View mail.worker.ts
const nodemailer = require('nodemailer')
import * as functions from 'firebase-functions'
import { User } from '../../types/User.type'
import { MoodController } from '../mood.controller'
import { StorageController } from '../storage.controller'
import { ZeebeController } from '../zeebe.controller'
const PORT = 465
export class MailWorkerController {
View mood.controller.ts
import { v4 } from 'uuid'
import { Document } from '../types/Document.type'
import { Mood, MoodRequest } from '../types/Mood.type'
import { User } from '../types/User.type'
import { Error, ErrorType } from '../utils/Error'
import { StorageController } from './storage.controller'
export class MoodController {
constructor(private store: StorageController) {}
View TrelloWebhookRouter.ts
const express = require('express')
import { NextFunction, Request, Response } from 'express'
import { StorageController } from '../../controller/storage.controller'
import { ZeebeController } from '../../controller/zeebe.controller'
import { TrelloBoardType } from '../../types/TrelloBoard.type'
import { Error, ErrorType } from '../../utils/Error'
export class TrelloWebhookRouter {
public router = express.Router({ mergeParams: true })
View trello.worker.ts
import { StorageController } from '../storage.controller'
import { TrelloController } from '../trello.controller'
import { ZeebeController } from '../zeebe.controller'
export class TrelloWorkerController {
constructor(
private zeebeController: ZeebeController,
private store: StorageController,
) {}
View trello.controller.ts
import axios, { AxiosRequestConfig, AxiosResponse } from 'axios'
import * as functions from 'firebase-functions'
import { v4 } from 'uuid'
import { Document } from '../types/Document.type'
import { StorageController } from './storage.controller'
const BASEURL = 'https://api.trello.com/1'
export enum TRELLO {
KEY = 'key',
@urbanisierung
urbanisierung / restzeebe-topology.ts
Created Dec 3, 2020
Restzeebe: get status of Zeebe Cluster
View restzeebe-topology.ts
const { ZBClient } = require('zeebe-node')
const zbc = new ZBClient({
camundaCloud: {
clientId: connectionInfo.clientId,
clientSecret: connectionInfo.clientSecret,
clusterId: connectionInfo.clusterId,
},
})