投稿時間:2022-12-27 15:25:07 RSSフィード2022-12-27 15:00 分まとめ(31件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
IT ITmedia 総合記事一覧 [ITmedia News] 「遊んで稼ぐ」は実現可能か? コロプラ創業者が挑む、持続可能なブロックチェーンゲームとは https://www.itmedia.co.jp/news/articles/2212/27/news059.html itmedia 2022-12-27 14:50:00
IT ITmedia 総合記事一覧 [ITmedia PC USER] 今年はどのゲームをどれくらい遊んだ? Steamのツールで見てみよう https://www.itmedia.co.jp/pcuser/articles/2212/27/news120.html itmediapcuser 2022-12-27 14:17:00
IT ITmedia 総合記事一覧 [ITmedia ビジネスオンライン] 街の住みここち「ふるさと版」 3位「沖縄県北谷町」、2位「北海道東神楽町」、1位は? https://www.itmedia.co.jp/business/articles/2212/27/news111.html itmedia 2022-12-27 14:03:00
python Pythonタグが付けられた新着投稿 - Qiita ファインチューニング(感情分析)したLUKEを公開しました(たった2ステップで完結!LUKEでの感情分析) https://qiita.com/Mizuiro__sakura/items/2dd4430cdee689dc2ddc huggingface 2022-12-27 14:52:18
python Pythonタグが付けられた新着投稿 - Qiita Pythonでのカラムの抽出 https://qiita.com/IMMI/items/0a6968809d7c7d18ff6c dfdfdrop 2022-12-27 14:43:33
Ruby Rubyタグが付けられた新着投稿 - Qiita ループ文 https://qiita.com/meitetsusutsushima1/items/bb5504b8d690b08dc6e7 foriindostrgetsputsstrend 2022-12-27 14:47:49
AWS AWSタグが付けられた新着投稿 - Qiita OpenSearchでBackend rolesを使ってユーザーとロールを紐づける https://qiita.com/yust0724/items/0051b5ba280e90fd847c amazonopensearchservice 2022-12-27 14:43:04
GCP gcpタグが付けられた新着投稿 - Qiita Google Cloud 認定試験のトラブル対処法 https://qiita.com/tsuvic/items/647a8cada574a0045719 cloud 2022-12-27 14:18:40
技術ブログ Developers.IO [レポート] Refactoring strategies for .NET applications as you migrate to the cloud #reinvent #XNT301 https://dev.classmethod.jp/articles/reinvent2022-xnt301/ egiesfornetapplicationsas 2022-12-27 05:17:13
技術ブログ Developers.IO [レポート] AWS Resource Explorer についての Chalk Talk に参加しました #reinvent #COP220 https://dev.classmethod.jp/articles/reinvent2022-resourceexplorer-cop220/ awsresourceexplorer 2022-12-27 05:01:15
技術ブログ クックパッド開発者ブログ 施策を "Own it" するエンジニア 〜オーナーエンジニア制度の紹介〜 https://techlife.cookpad.com/entry/owner-engineer 施策をquotOwnitquotするエンジニアオーナーエンジニア制度の紹介クックパッドのレシピサービス開発に導入しているオーナーエンジニアと呼ばれる制度について紹介します。 2022-12-27 14:30:00
海外TECH DEV Community Pleroma 2.5.0 with Elixir 1.11 on OpenBSD 7.1 https://dev.to/nabbisen/pleroma-250-with-elixir-111-on-openbsd-71-302k Pleroma with Elixir on OpenBSD SummaryPleroma is one of the fediverse implementations for microblogging like Twitter and Mastodon It uses Elixir which runs on Erlang VM known for creating low latency distributed and fault tolerant systems Here is the default landing view The new major version was released just last week This post shows how to install it on OpenBSD the solid unix system Why was OpenBSD used instead of the latest I found it was easier to use OpenBSD in order to install Pleroma for Elixir in ports was available On the mix task below failed env LC ALL en US UTF MIX ENV prod mix phx serverwith the error xx xx xx xxx notice Application runtime tools exited runtime tools start normal returned an error shutdown failed to start child ttb autostart EXIT an exception was raised UndefinedFunctionError function observer backend ttb resume trace is undefined module observer backend is not available runtime tools observer backend ttb resume trace runtime tools ttb autostart erl ttb autostart init stdlib gen server erl gen server init it stdlib gen server erl gen server init it stdlib proc lib erl proc lib init p do apply Kernel pid terminated application controller application start failure runtime tools shutdown failed to start child ttb autostart undef observer backend ttb resume trace ttb autostart init file ttb autostart erl line gen server init it file gen server erl line gen server init it file gen server erl line proc lib init p do apply file proc lib erl line runtime tools start normal Kernel pid terminated application controller application start failure runtime tools shutdown failed to start child ttb autostart undef observer backend ttb resume trace ttb autostart init file ttb autostart erl line gen server init it file gen server erl line gen server init it file gen server erl line proc lib init p do apply file proc lib erl line runtime tools start normal Crash dump is being written to erl crash dump doneIt s possibly because of the version of Elixir provided by s ports EnvironmentOpenBSD released on Apr PostgreSQL released on Aug Erlang OTP released on Feb Elixir released on May Pleroma released on Dec Backend version Frontend version abab Tutorial Prepare database application engine userYou have to set up the database the application engine and the service daemon user Install PostgreSQL server Optional Skip this section if the database server already runs with postgresql contrib its extensions in your environment Install PostgreSQL and the extensions doas pkg add postgresql server postgresql contribThe output was quirks signed on T Zpostgresql server libxml p okpostgresql server postgresql client okuseradd Warning home directory var postgresql doesn t exist and m was not specifiedpostgresql server okpostgresql contrib okRunning tags okThe following new rcscripts were installed etc rc d postgresqlSee rcctl for details New and changed readme s usr local share doc pkg readmes postgresql serverThen let s initialize the database system Act as postgresql doas su postgresql to run initdb D var postgresql data U postgresThe output was The files belonging to this database system will be owned by user postgresql This user must also own the server process The database cluster will be initialized with locale C The default database encoding has accordingly been set to SQL ASCII The default text search configuration will be set to english Data page checksums are disabled creating directory var postgresql data okcreating subdirectories okselecting dynamic shared memory implementation posixselecting default max connections selecting default shared buffers MBselecting default time zone Asia Tokyocreating configuration files okrunning bootstrap script okperforming post bootstrap initialization oksyncing data to disk okinitdb warning enabling trust authentication for local connectionsYou can change this by editing pg hba conf or using the option A or auth local and auth host the next time you run initdb Success You can now start the database server using pg ctl D var postgresql data l logfile startDone exitFinally activate the daemon and start it doas rcctl enable postgresql doas rcctl start postgresql Install ElixirThankfully the ports system provides the application environment required doas pkg add elixirThe output was quirks signed on T Zelixir p erlang pv okelixir p ok erlang pv You may wish to add usr local lib erlang man to etc man conf Install the packages for PleromaAlso the ports system helps us Install the essential packages doas pkg add gmake git cmake libmagicAdditionally there are optional ones doas pkg add ImageMagick ffmpeg p Image ExifToolThe output of the former was quirks signed on T Zgmake okgit p cvsps p ok git p okcmake pv libuv ok cmake pv oklibmagic okThe following new rcscripts were installed etc rc d gitdaemonSee rcctl for details New and changed readme s usr local share doc pkg readmes gitThat of the latter was quirks signed on T ZImageMagick x p ok ImageMagick okffmpeg pv fribidi ok ffmpeg pv okp Image ExifTool okRunning tags okNew and changed readme s usr local share doc pkg readmes ffmpeg usr local share doc pkg readmes sdl Create user and project directoryCreate the app user used in a part of rc d the daemon scripts doas useradd d var www pleroma m pleromaHere We define var www pleroma as the home directory which is automatically created Create the project directory next to it and set the permissions doas mkdir var www pleroma doas chown R pleroma pleroma var www pleromaFinally extend the user class because the default settings may be too small to run Elixir Phoenix apps doas nvim etc login conflike below pleroma datasize max M datasize cur M openfiles max Then apply it doas cap mkdb etc login confAs a reference the results were ls l etc login rw r r root wheel Dec etc login conf rw r r root wheel Dec etc login conf db Install PleromaHere is the main part at last Assume a position and get the sourceAct as doas su pleroma Well ksh will be perhaps used Go to the project directory cd var www pleromaGet the latest stable source in the current directory git clone b stable The output was Cloning into remote Enumerating objects done remote Counting objects done remote Compressing objects done remote Total delta reused delta pack reused Receiving objects MiB MiB s done Resolving deltas done Mix task deps getGet the dependencies mix deps getYou will be asked to install Hex Go ahead warning the VM is running with native name encoding of latin which may cause Elixir to malfunction as it expects utf Please ensure your locale is set to UTF which can be verified by running locale in your shell RUNNING IN LOCALHOST DEV MODE FEDERATION WON T WORK UNTIL YOU CONFIGURE A dev secret exsCould not find Hex which is needed to build dependency phoenixShall I install Hex if running non interactively use mix local hex force Yn yThe output was creating var www pleroma mix archives hex Getting gettext fbbcedbdcefa remote Enumerating objects done remote Counting objects done remote Compressing objects done remote Total delta reused delta pack reused Resolving Hex dependencies Resolution completed in sUnchanged accept websockex Getting phoenix Hex package Getting phoenix pubsub Hex package You have added upgraded packages you could sponsor run mix hex sponsor to learn more Fix elixir captcha which is incompatible with OpenBSD Optional elixir captcha is provided in the previous section which incompatible with OpenBSD for it uses make in any envs If you want to use the native captcha of Pleroma you have to tell it to use gmake instead Edit nvim deps captcha mix exsto defmodule Mix Tasks Compile Make do def run do result error code System cmd make stderr to stdout true result error code System cmd gmake stderr to stdout true Mix shell info result defmodule Mix Tasks Clean Make do def run do result error code System cmd make clean stderr to stdout true result error code System cmd gmake clean stderr to stdout true Mix shell info result Otherwise you will get the error below which is not fatal in running mix pleroma instance gen gt captcharm f priv captcha src captcha o cc g c src captcha cmkdir p privcc I src o priv captcha src captcha o cc error no such file or directory src captcha o cc error no input files Error in var www sites scqr oyoyo today pleroma deps captcha Makefile priv captcha Mix task pleroma instance genRun to generate Pleroma instance env MIX ENV prod mix pleroma instance genYou will be asked to install rebar Go ahead as well warning the VM is running with native name encoding of latin which may cause Elixir to malfunction as it expects utf Please ensure your locale is set to UTF which can be verified by running locale in your shell warning config prod secret exs not found You may want to create one by running mix pleroma instance gen Could not find rebar which is needed to build dependency parse transI can install a local copy which is just used by MixShall I install rebar if running non interactively use mix local rebar force Yn yThe output was creating var www pleroma mix rebar creating var www pleroma mix rebar gt Analyzing applications gt Compiling parse trans gt pleromaCompiling files ex Generated pleroma app Configure appThen you will be asked as below It s actually up to you What domain will your instance use e g pleroma soykaf com pleroma on openbsd comWhat is the name of your instance e g The Corndog Emporium pleroma on openbsd com What is your admin email address ciao pleroma on openbsd comWhat email address do you want to use for sending email notifications ciao pleroma on openbsd com Do you want search engines to index your site y n n Do you want to store the configuration in the database allows controlling it from admin fe y n n What is the hostname of your database localhost What is the name of your database pleroma What is the user used to connect to your database pleroma What is the password used to connect to your database autogenerated Would you like to use RUM indices n What port will the app listen to leave it if you are using the default setup with nginx What ip will the app listen to leave it if you are using the default setup with nginx What directory should media uploads go in when using the local uploader uploads What directory should custom public files be read from custom emojis frontend bundle overrides robots txt etc instance static Do you want to strip location GPS data from uploaded images This requires exiftool it was detected as installed y n y Do you want to read data from uploaded files so clients can use it to prefill fields like image description This requires exiftool it was detected as installed y n y Do you want to anonymize the filenames of uploads y n n yDo you want to deduplicate uploaded files y n n Writing config to config generated config exs Writing the postgres script to config setup db psql Writing var www pleroma instance static robots txt All files successfully written Refer to the installation instructions for your platform for next steps Generating instance is completed Prepare your own custom config file cp config generated config exs config prod secret exs Customize app Optional In case you might need do edit it nvim config prod secret exsFor example when your PostgreSQL server is in an external host and moreover requires TLS SSL connections config pleroma Pleroma Repo hostname your hostname hostname your hostname port xxx ssl true config pleroma Pleroma Captcha enabled trueAlso when you want use kocaptcha instead of native captcha config pleroma Pleroma Captcha enabled true method Pleroma Captcha Kocaptcha Migrate databaseLet s set up the database of Pleroma Run psql U postgres f config setup db psqlThe output was CREATE ROLECREATE DATABASEYou are now connected to database pleroma as user postgres CREATE EXTENSIONCREATE EXTENSIONCREATE EXTENSIONThen run to migrate env MIX ENV prod mix ecto migrateThe output was warning the VM is running with native name encoding of latin which may cause Elixir to malfunction as it expects utf Please ensure your locale is set to UTF which can be verified by running locale in your shell Compiling files ex xx xx xx xxx info Migrated in sxx xx xx xxx info Running Pleroma Repo Migrations DeprecateQuack up forwardxx xx xx xxx info Migrated in s Mix task Start Phoenix serverWe are almost ready Start Phoenix env LC ALL en US UTF MIX ENV prod mix phx serverThe output was xx xx xx xxx warning Description Authenticity is not established by certificate path validation Reason Option verify verify peer and cacertfile cacerts is missing xx xx xx xxx info tzdata release in place is from a file last modified Wed Oct GMT Release file on server was last modified Sat Oct GMT xx xx xx xxx warning The on load function for module crypt returned error load Library load call unsuccessful xx xx xx xxx info Tzdata has updated the release from d to fxx xx xx xxx warning The on load function for module crypt returned error load Library load call unsuccessful xx xx xx xxx info Running Pleroma Web Endpoint with cowboy at http xx xx xx xxx info Access Pleroma Web Endpoint at https your domain xx xx xx xxx info Gopher server disabledxx xx xx xxx info Transferring embedded hashtags to hashtags from oid xx xx xx xxx warn The on load function for module crypt returned error load Library load call unsuccessful xx xx xx xxx info Running Pleroma Web Endpoint with cowboy at http xx xx xx xxx info Access Pleroma Web Endpoint at xx xx xx xxx info Gopher server disabledxx xx xx xxx info Transferring embedded hashtags to hashtags from oid xx xx xx xxx info Deleting context objects from objects from oid Testing the serverKeep the Phoenix process above actually acting as Pleroma running Check if the response returns correctly curl I In my case the response header was HTTP OKaccess control allow credentials trueaccess control allow origin access control expose headers Link X RateLimit Reset X RateLimit Limit X RateLimit Remaining X Request Id Idempotency Keycache control max age private must revalidatecontent length content security policy upgrade insecure requests script src self wasm unsafe eval connect src self blob wss pleroma on openbsd com media src self https img src self data blob https default src none base uri self frame ancestors none style src self unsafe inline font src self manifest src self content type text html charset utf date Mon Dec GMTpermissions policy interest cohort referrer policy same originserver Cowboyx content type options nosniffx download options noopenx frame options DENYx permitted cross domain policies nonex request id FzRX VnDh YizPQAABaRx xss protection mode blockSeems sweet When HTTP OK is printed the health of your Pleroma is good Create a Pleroma adminNote you are in var www pleroma as pleroma Run to create a super user env LC ALL en US UTF MIX ENV prod mix pleroma user new admin name your e mail adminYou will be asked as below A user will be created with the following information nickname pleroma admin email pleroma admin example com password generated a reset link will be created name admin name bio moderator false admin trueContinue n yWhen I proceeded the output was User admin name createdAdmin status of admin name trueGenerated password reset token for admin name URL https your domain api v pleroma password reset xxx Start relaydBy default Pleroma listens to only the localhost In order to publish it as service you have to combine it with some web server In Pleroma the cases using nginx seem more than Apache or Caddy OpenBSD develops and supports relayd their native relay daemon which runs as a load balancer application layer gateway or transparent proxy In order for relayd to relay the requests responses between the outside and Pleroma inside edit doas nvim etc relayd confThe simplest configuration is below table lt pleroma server gt relay pleroma listen on egress port forward to lt pleroma server gt port check http code Activate and start it doas rcctl enable relayd doas rcctl start relayd rc d scriptThere is another issue left to publish Pleroma as service It is not registered as daemon To solve it create the rc d script doas nvim etc rc d pleromaWrite the below in it bin kshdaemon cd var www pleroma env LC ALL en US UTF MIX ENV prod mix daemon user pleroma daemon flags phx server no compile etc rc d rc subrrc cmd Besides I tried daemon execdir var www pleroma instead of cd but it didn t work Set the permissions doas chmod a x etc rc d pleromaThen activate and run it doas rcctl enable pleroma doas rcctl start pleromaWell there is an alternative way If you don t want to enable it now you can start it temporarily with f option The whole command line is doas rcctl f start pleroma ConclusionAccess with your browser to You will see the front page After signing in the dashboard must be there Enjoy swimming across the fediverse Reference 2022-12-27 05:40:18
海外TECH DEV Community Slack Next-gen Platform - Datastores https://dev.to/seratch/slack-next-gen-platform-datastores-3292 Slack Next gen Platform DatastoresIn this tutorial you ll learn how to use datastores in your Slack s next generation platform apps PrerequisitesIf you re new to the platform please read my The Simplest Hello World tutorial first In a nutshell you ll need a paid Slack workspace and permission to use the beta feature in the workspace And then you can connect your Slack CLI with the workspace If all the above are already done you re ready to build your first app Let s get started Create a Blank ProjectWhen you start a new project you can run slack create command In this tutorial you will build an app from scratch So select Blank project from the list slack create Select a template to build from Hello World A simple workflow that sends a greeting Scaffolded project A solid foundational project that uses a Slack datastore gt Blank project A well blank project To see all available samples visit github com slack samples Once the project is generated let s check if slack run command works without any issues This command installs a dev version of your new app into your connected Slack workspace Now your app s bot user is in the workspace and your app has its bot token for API calls cd nifty capybara slack run Choose a workspace seratch TEMJU App is not installed to this workspaceUpdating dev app install for workspace Acme Corp ️Outgoing domains No allowed outgoing domains are configured If your function makes network requests you will need to allow the outgoing domains Learn more about upcoming changes to outgoing domains seratch of Acme CorpConnected awaiting eventsIf you see Connected awaiting events log message the app is successfully connected to Slack You can hit Ctrl C to terminate the local app process In this tutorial you will learn how to talk to your datastores using CLI and then via your function code Add Datastores to Your AppThe first step is to add a datastore to your app Create a new file named tasks ts and save the following source code import DefineDatastore Schema from deno slack sdk mod ts export const datastore DefineDatastore name tasks The primary key s type must be a string primary key id attributes id type Schema types string required true title type Schema types string required true description type Schema types string optional due type Schema types string optional If you re interested in other available options for attributes refer to for details Next add the datastore to your manifest ts You can add imported datastore definitions to the datastores list property Also you need to add datastore read and datastore write in botScopes to run queries toward the datastores associated with this app import Manifest from deno slack sdk mod ts import datastore as Tasks from tasks ts export default Manifest name nifty capybara description Datastore Example icon assets default new app icon png datastores Tasks botScopes commands Necessary for accessing datastores datastore read datastore write And then please don t forget to run slack run command to reflect the changes to the Slack hosting infra Use Datastores via CLI CommandsTo quickly learn how to run queries and data manipulation let s use the subcommands under slack datastore namespace Run slack datastore help to see the list of available subcommands slack datastore helpQuery an App DatastoreUSAGE slack datastore lt subcommand gt flags SUBCOMMANDS delete Delete a datastore item Docs get Get an item from the slack datastore Docs put Create Update an App Datastore Docs query Query for datastore items Docs FLAGS h help help for datastoreGLOBAL FLAGS apihost string Slack API host f force ignore warnings and continue executing command l local run run use the local run app created by the run command r runtime string project s runtime language deno deno deno x etc Default deno s skip update skip checking for latest version of CLI slackdev use the Slack Dev API apihost dev slack com v verbose when set print debug logging w workspace string use a specific workspace by domain nameEXAMPLE slack datastore put datastore todos app AABCD item id description Create a PR status Done ADDITIONAL HELP slack datastore lt subcommand gt help for more information about a specific command For more information read the documentation For all the commands you ll use in this tutorial the argument is a simple JSON data string For example if you want to fetch data from tasks datastore the CLI command argument can be datastore tasks To make sure that your datastore is created on the hosting server side run slack datastore query datastore tasks slack datastore query datastore tasks Choose a workspace Choose a local development workspace Choose a local development workspace seratch TEMJU nifty capybara AGBSFABRetrieved items from datastore tasksTo create or update existing items run slack datastore put item The query command works but it returns zero results as expected As the command output suggests let s add a new row to the datastore Insert DataThe argument for data creation can be something like this datastore tasks item id title Make a phone call Let s run slack datastore put datastore tasks item id title Make a phone call command to insert a new row slack datastore put datastore tasks item id title Make a phone call Choose a workspace Choose a local development workspace Choose a local development workspace seratch TEMJU nifty capybara AGBSFABStored below record in the datastore tasks id title Make a phone call To inspect the datastore after updates run slack datastore query expression Yay a new record was successfully saved Let s run the above query again to see how the datstore was changed slack datastore query datastore tasks Choose a workspace Choose a local development workspace Choose a local development workspace seratch TEMJU nifty capybara AGBSFABRetrieved items from datastore tasksTalk id title Make a phone call To create or update existing items run slack datastore put item The command returned one record as expected There are a few things to know about this put operation First please double check the item s property names when running the put operation If you pass invalid names in the item the properties will be just ignored The API call succeeds and no error code is returned Also you must use Schema types string type for your datastore s primary key As of this writing it is technically possible to try a different type for a primary key However with the settings put operations do not work as you expect So you will have to re create the datastore eventually Run a QueryYou ve already tried a simple query without an expression Now let s try a more realistic query to fetch data Slack s datastores enable developers to use Amazon DynamoDB query syntax for query conditions More specifically expression expression attributes expression values need to be passed when performing a query Let s run a query with this condition datastore tasks expression begins with title title expression attributes title title expression values title Make a The query should succeed and return a row slack datastore query datastore tasks expression begins with title title expression attributes title title expression values title Make a Choose a workspace Choose a local development workspace Choose a local development workspace seratch TEMJU nifty capybara AGBSFABRetrieved items from datastore tasks id title Make a phone call To create or update existing items run slack datastore put item Here is a primary key query example slack datastore query datastore tasks expression id id expression attributes id id expression values id Choose a workspace Choose a local development workspace Choose a local development workspace seratch TEMJU nifty capybara AGBSFABRetrieved items from datastore tasks id title Make a phone call To create or update existing items run slack datastore put item If a query does not match any rows it returns zero results slack datastore query datastore tasks expression id id expression attributes id id expression values id Choose a workspace Choose a local development workspace Choose a local development workspace seratch TEMJU nifty capybara AGBSFABRetrieved items from datastore tasksTo create or update existing items run slack datastore put item Update an Existing RowLet s update a row using the CLI command You already know how to do it as nothing differs from the row creation example You can run the put operation with the same primary key slack datastore put datastore tasks item id title Make a phone call to Jim due Dec Choose a workspace Choose a local development workspace Choose a local development workspace seratch TEMJU nifty capybara AGBSFABStored below record in the datastore tasks due Dec id title Make a phone call to Jim To inspect the datastore after updates run slack datastore query expression Delete a RowYou can run the delete operation with a primary key to delete a row Note that the argument must have the primary key at the top level of JSON data meaning it s not datastore tasks item id but datastore tasks id slack datastore delete datastore tasks id Choose a workspace Choose a local development workspace Choose a local development workspace seratch TEMJU nifty capybara AGBSFABDeleted from datastore tasksprimary key To inspect the datastore after updates run slack datastore query expression Now that you ve learned all four operations with Slack s datastores you re already an expert on the feature Use Datastores via FunctionsThe CLI commands are convenient for ad hoc queries or initial data imports However to build something meaningful with the datastore your app needs to do the same in function code Here is a simple example code demonstrating all the above operations in code Save this as function ts import DefineFunction SlackFunction from deno slack sdk mod ts Add deno slack source file resolver to imports in import map jsonimport FunctionSourceFile from deno slack source file resolver mod ts export const def DefineFunction callback id datastore demo title Datastore demo source file FunctionSourceFile import meta url input parameters properties required output parameters properties required export default SlackFunction def async client gt const creation await client apps datastore put datastore tasks item id title Make a phone call to Jim console log creation result JSON stringify creation null if creation error return error creation error const query await client apps datastore query datastore tasks expression id id expression attributes id id expression values id console log query result JSON stringify query null if query error return error query error const modification await client apps datastore put datastore tasks item id title Make a phone call to Jim due Dec console log modification result JSON stringify modification null if modification error return error modification error const deletion await client apps datastore delete datastore tasks id console log deletion result JSON stringify deletion null if deletion error return error deletion error return outputs To run this function let s create a simple workflow and its trigger Save the following code as workflow and trigger ts import DefineWorkflow from deno slack sdk mod ts export const workflow DefineWorkflow callback id datastore demo workflow title Datastore Demo Workflow input parameters properties required import def as Demo from function ts workflow addStep Demo import Trigger from deno slack api types ts const trigger Trigger lt typeof workflow definition gt type webhook name Datastore Demo Trigger workflow workflows workflow definition callback id inputs export default trigger Don t forget to add the workflow to manifest ts import Manifest from deno slack sdk mod ts import datastore as Tasks from tasks ts Add thisimport workflow as DemoWorkflow from workflow and trigger ts export default Manifest name nifty capybara description Datastore Example icon assets default new app icon png datastores Tasks workflows DemoWorkflow Add this botScopes commands Necessary for accessing datastores datastore read datastore write Lastly create a new webhook trigger using the workflow and trigger ts source code slack triggers create trigger def workflow and trigger ts Choose an app seratch dev TEMJU nifty capybara dev AGBSFABTrigger created Trigger ID FtGPRGMGT Trigger Type webhook Trigger Name Datastore Demo Trigger Webhook URL Now you can trigger the workflow just by sending an HTTP POST request Before sending a request make sure that you re running a slack run session in a terminal window curl XPOST ok true On the slack run terminal window you ll see the following console outputs info FnGSCLDQC Trace TrGHBTXKQ Function execution started for workflow function Datastore Demo Workflow info WfGPULBY Trace TrGMVNXKP Execution started for workflow Datastore Demo Workflow info WfGPULBY Trace TrGMVNXKP Executing workflow step of info FnGPRUF Trace TrGMVNXKP Function execution started for app function Datastore demo creation result ok true datastore tasks item id title Make a phone call to Jim query result ok true datastore tasks items id title Make a phone call to Jim modification result ok true datastore tasks item due Dec id title Make a phone call to Jim deletion result ok true info FnGPRUF Trace TrGMVNXKP Function execution completed for function Datastore demo info WfGPULBY Trace TrGMVNXKP Execution completed for workflow step Datastore demo info FnGSCLDQC Trace TrGHBTXKQ Function execution completed for function Datastore Demo Workflow info WfGPULBY Trace TrGMVNXKP Execution completed for workflow Datastore Demo Workflow OK that s it You don t need this example app anymore So let s clean it up by running the slack uninstall command slack uninstall Choose a workspace Choose a local development workspace Choose a local development workspace seratch dev TEMJU nifty capybara dev AGBSFAB️Danger zone App AGBSFAB will be permanently deleted App AGBSFAB will be uninstalled from dev TEMJU All triggers workflows and functions will be deleted All datastores for this app will be deleted Once you delete this app there is no going back Are you sure you want to uninstall YesWorkspace Uninstall Uninstalled the app nifty capybara from workspace Acme Corp App Manifest Deleted the app manifest for nifty capybara from workspace Acme Corp ️Installed Workspaces There are no workspaces with the app installed Dev vs Prod DatastoresWhen you deploy an app by slack deploy command the Slack infra automatically creates the datastores dedicated to the prod app No data is shared among dev versions and deployed prod app In other words any data operations with dev version of your app never affect your prod app s data With that being said when your local CLI has permission to deploy the prod app your slack datastore commands have access to the production datastores too So please be extremely careful when you use slack datastore commands Wrapping UpYou ve learned the following points with this hands on tutorial Save data and run queries toward Slack datastores via CLI commandsSave data and run queries toward Slack datastores via function codeDelete an unnecessary app using slack uninstall commandThe complete project is available at I hope you enjoy this tutorial As always if you have any comments or feedback please feel free to let me know on Twitter seratch or elsewhere I can check out Happy hacking with Slack s next generation platform 2022-12-27 05:10:48
Apple AppleInsider - Frontpage News Get Apple's M1 13-inch MacBook Pro with 16GB RAM, 1TB SSD for $1,369 https://appleinsider.com/articles/22/12/27/get-apples-m1-13-inch-macbook-pro-with-16gb-ram-1tb-ssd-for-1369?utm_medium=rss Get Apple x s M inch MacBook Pro with GB RAM TB SSD for Pick up a loaded M MacBook Pro inch with GB RAM and TB SSD for a discount during B amp H s Mega Deal Zone Event Save on the M MacBook Pro Read more 2022-12-27 05:55:07
医療系 医療介護 CBnews 病床確保料「調査・検証が必要」、厚労相-効果含めて https://www.cbnews.jp/news/entry/20221227141252 加藤勝信 2022-12-27 14:20:00
医療系 医療介護 CBnews コロナ心の健康相談が増加、ワクチン副反応不安も-厚労省が11月の対応状況を公表 https://www.cbnews.jp/news/entry/20221227133420 厚生労働省 2022-12-27 14:10:00
金融 ニッセイ基礎研究所 回復する訪日外客数、属性の変化とエリア別稼働率の動向~2022年11月 ホテル客室稼働率、訪日外客数 https://www.nli-research.co.jp/topics_detail1/id=73380?site=nli コロナ禍前と国籍・地域別の訪日回数の傾向が大きく変化していないとすれば、コロナ禍前よりも「初めて訪日する人」の割合が増加していると推定される。 2022-12-27 14:58:52
ニュース BBC News - Home US winter storm traps New York State residents in cars https://www.bbc.co.uk/news/world-us-canada-64099642?at_medium=RSS&at_campaign=KARANGA canada 2022-12-27 05:28:19
ニュース BBC News - Home China ends Covid quarantine for travellers in January https://www.bbc.co.uk/news/world-asia-china-64097497?at_medium=RSS&at_campaign=KARANGA covid 2022-12-27 05:06:14
ニュース BBC News - Home Michael Gove: Better housing design could curb development opposition https://www.bbc.co.uk/news/uk-64099508?at_medium=RSS&at_campaign=KARANGA focus 2022-12-27 05:43:09
サブカルネタ ラーブロ 華丸ラーメン@筒井(青森県) 「焼干しらーめん(中)」 http://ra-blog.net/modules/rssc/single_feed.php?fid=206110 続きを読む 2022-12-27 05:31:17
北海道 北海道新聞 井納が現役引退 巨人を戦力外 https://www.hokkaido-np.co.jp/article/781269/ 井納翔一 2022-12-27 14:38:00
北海道 北海道新聞 マスク拒否の被告が控訴 大阪、ピーチ機運航妨害 https://www.hokkaido-np.co.jp/article/781267/ 感染対策 2022-12-27 14:35:00
北海道 北海道新聞 杉田政務官が辞表「年末の節目」 総務相「本人が決断」 https://www.hokkaido-np.co.jp/article/781253/ 杉田水脈 2022-12-27 14:20:37
北海道 北海道新聞 雪下ろし中に転落 2人心肺停止 音威子府 https://www.hokkaido-np.co.jp/article/781260/ 上川管内 2022-12-27 14:02:55
ビジネス 東洋経済オンライン 「100歳まで生きる」のに必要なたった1つの考え方 加齢で体が衰えるのを運命として受け入れる | 健康 | 東洋経済オンライン https://toyokeizai.net/articles/-/639487?utm_source=rss&utm_medium=http&utm_campaign=link_back 東洋経済オンライン 2022-12-27 15:00:00
IT 週刊アスキー 水木しげる作品が堪能できる企画展! 「鬼太郎商店 in MARK IS みなとみらい」2023年1月21日~2月5日開催 https://weekly.ascii.jp/elem/000/004/118/4118970/ inmarkis 2022-12-27 14:30:00
IT 週刊アスキー 12月27日21時から!『PSO2 NGS』公式番組で1月アップデート情報が公開 https://weekly.ascii.jp/elem/000/004/119/4119017/ psongs 2022-12-27 14:15:00
マーケティング AdverTimes オートバックスセブン 、ブランド事業統括ほか(23年4月1日付) https://www.advertimes.com/20221227/article407880/ 統括 2022-12-27 05:56:55
マーケティング AdverTimes 40年以上、映画への熱が冷めたことは一度もない―戸田奈津子氏(「私の広告観」出張所) https://www.advertimes.com/20221227/article407855/ ここでは「私の広告観出張所」として、インタビューの一部や誌面では掲載しきれなかった話をお届けします。 2022-12-27 05:38:05
マーケティング AdverTimes ユーグレナ、企業コミュニケーションに小説 経営陣が作家と創作 https://www.advertimes.com/20221227/article407842/ 特設サイト 2022-12-27 05:17:22

コメント

このブログの人気の投稿

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2020-12-01 09:41:49 RSSフィード2020-12-01 09:00 分まとめ(69件)