Skip to content

Commit

Permalink
- upload -> queue upload
Browse files Browse the repository at this point in the history
Signed-off-by: Nick Mitchell <[email protected]>
  • Loading branch information
starpit committed Sep 25, 2024
1 parent d53b70c commit 4f4be21
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
1 change: 1 addition & 0 deletions cmd/subcommands/queue.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ func init() {
cmd.AddCommand(queue.Last())
cmd.AddCommand(queue.Ls())
cmd.AddCommand(queue.Stat())
cmd.AddCommand(queue.Upload())
}

// Currently components rely on these operations, and in
Expand Down
11 changes: 2 additions & 9 deletions cmd/subcommands/upload.go → cmd/subcommands/queue/upload.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//go:build full || observe

package subcommands
package queue

import (
"context"
Expand All @@ -9,12 +9,11 @@ import (

"lunchpail.io/cmd/options"
"lunchpail.io/pkg/be"
"lunchpail.io/pkg/compilation"
"lunchpail.io/pkg/runtime/queue"
"lunchpail.io/pkg/runtime/queue/upload"
)

func newUploadCmd() *cobra.Command {
func Upload() *cobra.Command {
var cmd = &cobra.Command{
Use: "upload <srcDir> <bucket>",
Short: "Copy data into queue",
Expand Down Expand Up @@ -44,9 +43,3 @@ func newUploadCmd() *cobra.Command {

return cmd
}

func init() {
if compilation.IsCompiled() {
rootCmd.AddCommand(newUploadCmd())
}
}
2 changes: 1 addition & 1 deletion tests/bin/add-data.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ for bucket_path in $@; do
if [[ -d $bucket_path ]]; then
bucket=$(basename $bucket_path)
echo "$(tput setaf 2)Populating s3 app=$testapp target=${LUNCHPAIL_TARGET:-kubernetes} bucket=$bucket from $bucket_path$(tput sgr0)"
$testapp upload $bucket_path $bucket --target ${LUNCHPAIL_TARGET:-kubernetes}
$testapp queue upload $bucket_path $bucket --target ${LUNCHPAIL_TARGET:-kubernetes}
fi
done

0 comments on commit 4f4be21

Please sign in to comment.