- Docker Desktop (or Docker Engine + Docker Compose v2)
- Ports 3000 and 8000 free on your machine
1. Create a folder and open a terminal there:
1. Create a folder and open a terminal there:
| #!/bin/bash | |
| # Script to run Postman collection with better response data | |
| # This generates multiple report formats with full response bodies | |
| COLLECTION_ID="24483733-cefed589-9c3d-4dd5-9673-0e913981403e" | |
| ENVIRONMENT_ID="41094746-f8fd4ac6-fb62-4774-b8a5-38c42fd476e3" | |
| TIMESTAMP=$(date +%Y-%m-%d-%H-%M-%S) | |
| REPORT_DIR="postman-cli-reports" |
| /* | |
| * Hi! | |
| * | |
| * Note that this is an EXAMPLE Backstage backend. Please check the README. | |
| * | |
| * Happy hacking! | |
| */ | |
| import { createBackend } from '@backstage/backend-defaults'; | |
| import { loggerToWinstonLogger } from '@backstage/backend-common'; |
We love to generate our custom AI music with Postman and suno.ai and this repository is a nice API wrapper around suno.ai's functionalities. However, generating longer songs takes time and makes the custom_generate API call timeout in synchronous mode. We would like to make the endpoint wait up to 60 s when hosted in Vercel. The Vercel documentation on how to configure custom timeouts in the vercel.json file can be found here: https://vercel.com/docs/functions/configuring-functions/duration.
The API calls to give the 60 s timeout to are defined in src/app/api/custom_generate/route.ts.
Please propose the necessary changes to the repository.
Bonus: Can you create a Postman collection that is making use of the custom_generate API endpoint to create a beautiful pop song about automated code generation, contains a Postman visualization for the resulti
| var fs = require('fs'), // needed to read JSON file from disk | |
| Collection = require('postman-collection').Collection, | |
| Response = require('postman-collection').Response, | |
| myCollection; | |
| // Load a collection to memory from a JSON file on disk (say, sample-collection.json) | |
| myCollection = new Collection(JSON.parse(fs.readFileSync('sample-collection.json').toString())); | |
| // iterate through all requests in the collection | |
| myCollection.forEachItem(function (item) { |
| name: Postman IssueOps commands | |
| on: | |
| issue_comment: | |
| types: [created] | |
| jobs: | |
| prechecks: | |
| name: Permission pre-check | |
| if: github.event.issue.pull_request != null && (startsWith(github.event.comment.body, '/pm-release') || startsWith(github.event.comment.body, '/pm-publish')) |
| def checkout () { | |
| context="continuous-integration/jenkins/" | |
| context += isPRMergeBuild()?"pr-merge/checkout":"branch/checkout" | |
| def scmVars = checkout scm | |
| setBuildStatus ("${context}", 'Checking out completed', 'SUCCESS') | |
| if (isPRMergeBuild()) { | |
| prMergeRef = "refs/pull/${getPRNumber()}/merge" | |
| mergeCommit=sh(returnStdout: true, script: "git show-ref ${prMergeRef} | cut -f 1 -d' '") | |
| echo "Merge commit: ${mergeCommit}" | |
| return [prMergeRef, mergeCommit] |
| import { connect } from '@planetscale/database' | |
| import dotenv from 'dotenv' | |
| import express from 'express' | |
| import { ProxyAgent } from 'undici'; | |
| const agent = new ProxyAgent('http://localhost:5555'); | |
| global[Symbol.for('undici.globalDispatcher.1')] = agent; | |
| process.env['NODE_TLS_REJECT_UNAUTHORIZED'] = '0'; |
As the docker-compose files 👇 are using PlanetScale's MySQL-compatible Vitess database as an example, each database (temporal and temporal_internal) use different keyspaces and connection strings. Unfortunately, temporalio/auto-setup does not seem to support multiple connection strings for database creation and schema updates (using temporal-sql-tool), so the following commands would need to be run manually before starting up docker-compose:
./temporal-sql-tool --ep $TEMPORAL_PSCALE_HOSTSTRING --user $TEMPORAL_PSCALE_USER --tls --password $TEMPORAL_PASSWORD-p 3306 --plugin mysql --db temporal setup-schema -v 0.0
./temporal-sql-tool --ep $TEMPORAL_PSCALE_HOSTSTRING --user $TEMPORAL_PSCALE_USER --tls --password $TEMPORAL_PASSWORD-p 3306 --plugin mysql --db temporal update-schema -d ./schema/mysql/v57/temporal/versioned
./temporal| import sys | |
| from awsglue.transforms import * | |
| from awsglue.utils import getResolvedOptions | |
| from pyspark.context import SparkContext, SparkConf | |
| from awsglue.context import GlueContext | |
| from awsglue.job import Job | |
| import time | |
| from pyspark.sql.types import StructType, StructField, IntegerType, StringType | |
| sc = SparkContext() |